package Access;

import DAO.SimpleAccessorFactory;
import Entities.ExecutorWithInstrument;
import Exceptions.InvalidEntityException;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.lang.reflect.InvocationTargetException;
import java.sql.SQLException;
import java.util.LinkedList;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.ejb.Stateless;

/**
 *
 * @author 647_2
 */
@Stateless
public class ExecutorsWithInstrument implements ExecutorsWithInstrumentRemote {
    
    public LinkedList<ExecutorWithInstrument> getAllExecutorsWithInstrument(){
        try {
            ExecutorWithInstrument ewi = new ExecutorWithInstrument();
            return SimpleAccessorFactory.createSimpleAccessor(ewi).select(ewi);
        } catch (InvalidEntityException ex) {
            Logger.getLogger(ExecutorsWithInstrument.class.getName()).log(Level.SEVERE, null, ex);
        } catch (ClassNotFoundException ex) {
            Logger.getLogger(ExecutorsWithInstrument.class.getName()).log(Level.SEVERE, null, ex);
        } catch (SQLException ex) {
            Logger.getLogger(ExecutorsWithInstrument.class.getName()).log(Level.SEVERE, null, ex);
        } catch (NoSuchMethodException ex) {
            Logger.getLogger(ExecutorsWithInstrument.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            Logger.getLogger(ExecutorsWithInstrument.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IllegalArgumentException ex) {
            Logger.getLogger(ExecutorsWithInstrument.class.getName()).log(Level.SEVERE, null, ex);
        } catch (InvocationTargetException ex) {
            Logger.getLogger(ExecutorsWithInstrument.class.getName()).log(Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            Logger.getLogger(ExecutorsWithInstrument.class.getName()).log(Level.SEVERE, null, ex);
        } catch (UnsupportedEncodingException ex) {
            Logger.getLogger(ExecutorsWithInstrument.class.getName()).log(Level.SEVERE, null, ex);
        } catch (NoSuchFieldException ex) {
            Logger.getLogger(ExecutorsWithInstrument.class.getName()).log(Level.SEVERE, null, ex);
        } catch (FileNotFoundException ex) {
            Logger.getLogger(ExecutorsWithInstrument.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException ex) {
            Logger.getLogger(ExecutorsWithInstrument.class.getName()).log(Level.SEVERE, null, ex);
        }

        return null;
    }
 
}
